<template>
<div>
  <div class="header">
    <div class="logo"></div>
    <div class="search-box">
      <input type="text" class="search-input">
      <span class="search-btn"></span>
    </div>
    <div class="nav">
      <ul>
        <li><router-link to="/discoveringMusic" exact>发现音乐</router-link></li>
        <li><router-link to="/myMusic" exact>我的音乐</router-link></li>
        <li><router-link to="/followWithInterest" exact>关注</router-link></li>
        <li><router-link to="/shoppingMall" exact>商城</router-link></li>
        <li><router-link to="/musician" exact>音乐人</router-link></li>
        <li><router-link to="/download" exact>下载客户端</router-link></li>
      </ul>
    </div>
    <div class="user">
      <div class="avatar"></div>
      <div class="user-name"><a href=" ">未登录</a></div>
    </div>
    <!-- <div class="body">  <router-view></router-view></div> -->
  </div>

  <div class="top">
      <!-- 路由的出口 -->
      <router-view ></router-view>
  </div>

</div>
</template>

<script>
export default {};
</script>

<style scoped>
.top{
  margin: 0 auto;
}
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 0 20px;
  background-color: #242424;
  color: #fff;
}

.logo {
  width: 176px;
  height: 48px; 
  background-repeat: no-repeat;
  background-size: contain;
}

.search-box {
  position: relative;
  width: 400px;
  height: 32px;
}

.search-input {
  width: 100%;
  height: 100%;
  padding: 0 10px;
  border: none;
  background-color: #333;
  color: #fff;
  font-size: 14px;
}

.search-btn {
  position: absolute;
  right: 0;
  top: 0;
  width: 30px;
  height: 30px;

  background-repeat: no-repeat;
  background-size: contain;
  cursor: pointer;
}

.nav ul {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav li {
  margin: 0 20px;
  color: #fff;
  font-size: 14px;
}

.nav a {
  text-decoration: none;
  color: #fff;
  font-size: 14px;
}

.user {
  display: flex;
  align-items: center;
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%; 
  background-repeat: no-repeat;
  background-size: contain;
  margin-right: 10px;
}

.user-name a {
  color: #fff;
  font-size: 14px;
}
</style>